@{
    string lang = ViewBag.culture;
    Layout = null;
}
@section Seo{
    <title>@(SioService.GetConfig<string>("SiteName", ViewBag.culture)) - @Model.Title</title>
    <meta property="og:type" content="article" />
    <meta property="og:url" content="@($"{Context.Request.Scheme}://{Context.Request.Host}{Context.Request.Path}")" />
    <meta property="og:title" content="@Model.Title" />
    <meta property="og:description"
          content="@Model.SeoDescription" />
    <meta property="og:image" content="@Model.ThumbnailUrl" />
}
<div>
    <preview-popup ng-if="isInit" preview-object="previewObject"></preview-popup>
    @if (!string.IsNullOrEmpty(Model.TemplatePath))
    {
        try
        {
            <partial name="@Model.TemplatePath" model="@Model"/>
        }
        catch (System.InvalidOperationException invalidOperationException)
        {
            <p class="danger text-center has-error">Unable load template with Exception detail below:</p>
            <code>
                @invalidOperationException
            </code>

        }
        catch (Exception ex)
        {
            <code>
                @ex
            </code>
            <p class="danger text-center has-error">Unable load template</p>
        }
    }
    else
    {
        <section class="container">
            <h1>@(SioService.Translate<string>("Please choose template", ViewBag.culture))</h1>
        </section>
    }
</div>
@section Styles{
    
    @Html.Raw(Model.View?.Styles)
}
@section Scripts{
    
    @Html.Raw(Model.View?.Scripts)
}
